<template>
	<view v-if="list.length">
		<!-- 猜你喜欢 -->
		<view class="flex plr-36 mt-35 mb-10">
			<view class="size-34 bold">猜你喜欢</view>
		</view>
		<view class="flex_l flex-wrap pl-36">
			<goodItem :hasBtn="false" style="width: 46%;" class="mr-20 mtb-10" :item="item" v-for="(item, key) in list" :key="key"></goodItem>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[],
			};
		},
		mounted() {
			this.init()
		},
		methods: {
			init(){
				this.$http('/api/index/guesslike', {
					type: 1
				}).then(data=>{
					this.list = data;
				});
			},
			toDetail(item){
				console.log('猜你喜欢-详情')
				// let url = `/pages/home/good-detail?goods_id=${item.id}`;
				// url = item.url ? item.url : url;
				// uni.navigateTo({
				// 	url: url
				// })
			}
		}
	}
</script>

<style lang="scss">

</style>
